package com.hqyj.pojo;

import com.baomidou.mybatisplus.annotation.IdType;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author rock
 * @since 2021-10-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class ApplicationRecord extends MyPage implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField()
    private String name;

    private String sex;

    private Date birthyday;

    public void setBirthyday(String birthyday) {

        SimpleDateFormat sft = new SimpleDateFormat("yyyy-MM-dd");
        try {
            this.birthyday=sft.parse(birthyday);
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }

    public String getBirthyday() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        if (this.birthyday != null){
            return sdf.format(this.birthyday);
        }
        return "";

    }

    //
    private String tel;

    private String email;

    private Date applicationDate;

    public String getApplicationDate() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        if (this.applicationDate != null){
            return sdf.format(this.applicationDate);
        }
        return "";
    }

    public void setApplicationDate(String applicationDate) {
        SimpleDateFormat sft = new SimpleDateFormat("yyyy-MM-dd");
        try {
            this.applicationDate=sft.parse(applicationDate);
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }
    private int state;
}
